//
//  MXUserModel.m
//  MXLoginMethodsDomo
//
//  Created by 马彦 on 16/10/11.
//  Copyright © 2016年 MX. All rights reserved.
//

#import "MXUserModel.h"

#define UserNameSave @"userName"
#define PasswordSave @"password"

@implementation MXUserModel

+ (BOOL)userNameSave:(NSString *)userName {
    [[NSUserDefaults standardUserDefaults] setObject:userName forKey:UserNameSave];
    [[NSUserDefaults standardUserDefaults] synchronize];
    return YES;
}

+ (NSString *)readUserName {
    NSString *userName = [[NSUserDefaults standardUserDefaults] objectForKey:UserNameSave];
    return userName;
}

+ (BOOL)passwordSave:(NSString *)password {
    [[NSUserDefaults standardUserDefaults] setObject:password forKey:PasswordSave];
    [[NSUserDefaults standardUserDefaults] synchronize];
    return YES;
}

+ (NSString *)readPassword {
    NSString *password = [[NSUserDefaults standardUserDefaults] objectForKey:PasswordSave];
    return password;
}

@end
